﻿<%@Page Language="C#" Inherits="TopWinCMS.WebFactory.ClassPage" EnableSessionState="false" EnableViewState="false" %>
<%@ Import Namespace="TopWinCMS.BLL" %>
<!doctype html>
<html>
<head>
    <title>{SiteName}</title>
    <meta charset="utf-8" />
    <%: Styles.Render("~/Templates/TopWinCMS6/Style/Article.css") %>
    <!--[if lt IE 9]><script src="{SysPath}/Scripts/html5shiv.js"></script><![endif]-->
    <%: Scripts.Render("~/Script/Base") %>
    <%: Scripts.Render("~/Script/SuperSlide") %>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#focusBox").slide({ mainCell: ".bd ul", autoPlay: true, delayTime: 0, trigger: "click" });
            GetVote(1);
        });
    </script>
    <meta name="keywords" content="@MetaKeyword@" />
    <meta name="description" content="@MetaDescription@" />
    <script runat="server">
        private readonly static CoreManage Bll = new CoreManage();
        private void Page_Load(object sender, System.EventArgs e)
        {
            NewContentList.DataBind();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
<!--#include file="../Shared/Header.aspx"-->
<div style="height:4px">&nbsp;</div>
<div class="mainDiv">
  <div class="Left">
    <section class="div_ListBox">
      <header>
        <h2>网站公告</h2>
      </header>
      <div class="Content">
        <ul class="normal">
          <TW:Announces runat="server" Rows="10">
          <ItemTemplate>
            <li><a href='javascript:var win =window.open("../Announce/Announce.aspx?ID=<%# Eval("ID") %>",null,"width=502,height=200");'><%# Eval("UpdateTime")%>&nbsp;［<%# Eval("Title") %>］</a></li>
          </ItemTemplate>
          <EmptyDataTemplate>没有公告</EmptyDataTemplate>
        </TW:Announces>
        </ul>
      </div>
    </section>
    <section class="div_ListBox">
      <header>
        <h2>热门文章</h2>
      </header>
      <div class="Content">
        <ul>
          <TW:HotContents runat="server" Rows="10" Type="Week">
          <ItemTemplate>
            <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
          </ItemTemplate>
          <EmptyDataTemplate><li>没有数据</li></EmptyDataTemplate>
        </TW:HotContents>
        </ul>
      </div>
    </section>
    <section class="div_ListBox">
      <header>
        <h2>推荐文章</h2>
      </header>
      <div class="Content">
        <ul>
          <TW:EliteContents runat="server" Rows="10">
          <ItemTemplate>
            <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li>
          </ItemTemplate>
          <EmptyDataTemplate><li>没有数据</li></EmptyDataTemplate>
        </TW:EliteContents>
        </ul>
      </div>
    </section>
    <section class="div_ListBox">
      <header>
        <h2>投票调查</h2>
      </header>
      <div class="Content">
        <ul class="normal" id="vote">
      </ul>
      </div>
    </section>
  </div>
  <div class="Right">
    <div style="float:left; width:348px;margin-bottom:10px">
      <h2>文章更新
      </h2>
      <div class="DataList">
        <ul>
          <TW:NewContents runat="server" Rows="12">
            <ItemTemplate>
              <li><a href="<%# Eval("Link") %>" title="文章标题：<%# Eval("ContentTitle") %>&#13;&#10;阅读：<%# Eval("Hits") %>"><%# Eval("ContentTitle") %></a></li>
            </ItemTemplate>
          </TW:NewContents>
        </ul>
      </div>
    </div>
    <div style="width:310px; height:auto; float:right;padding:3px">
      <TW:Slide ClassID="10002" Rows="5">
        <div id="focusBox" class="focusBox">
          <div class="bd">
            <ul>
              <ItemTemplate>
                <li>
                  <div class="pic"><img src="@PicUrl@" alt="@ContentTitle@" /></div>
                  <div class="con"><a href="@Link@">@ContentTitle@</a></div>
                </li>
              </ItemTemplate>
            </ul>
          </div>
          <div class="hd">
            <ul>
              <TabTemplate>
                <li>@PageNo@</li>
              </TabTemplate>
            </ul>
          </div>
        </div>
      </TW:Slide>
    </div>
    <div style="width:100%; margin-top:4px; margin-bottom:10px;clear:both; height:auto;">
      <h2>最新图文</h2>
      <div style="border:#ccc solid 1px;overflow:hidden">
        <TW:PicContents Rows="5">
          <ItemTemplate>
            <div style="float:left; margin-left:12px; margin-top:4px;"> <a href="@Link@"><img src="@PicUrl@" width="120" height="90" title="@ContentTitle@" alt=""  /></a>
              <div style="width:120px; overflow:hidden;"><a href="@Link@" title="@ContentTitle@">@ShortTitle@</a> </div>
            </div>
          </ItemTemplate>
        </TW:PicContents>
      </div>
    </div>
      <TW:DataBox runat="server" ID="NewContentList" DataSource =<%# ClassManage.GetChildren(this.ClassID) %>>
          <ItemTemplate>
              <div class="NewContentList">
                  <h1><a href="<%# Eval("Link") %>"><%# Eval("ClassName")%></a></h1>
                  <div class="ContentBox">
                      <ul>
                          <TW:DataBox DataSource=<%# Bll.Latests(9,(int)Eval("ID")) %> runat="server">
                          <FirstItemTemplate>
                          <li class="FirstItem"><div class="left"><img src="<%# Eval("PicUrl") %>" width="120" height="90" title="<%# Eval("ContentTitle") %>" alt=""  /></div><div class="right"><h3><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></h3><p><%# Eval("Brief")%></p></div></li>
                          
                          </FirstItemTemplate>
                              <ItemTemplate>
                                  <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></li></ItemTemplate>
                          </TW:DataBox>
                      </ul>
                  </div>
              </div>
          </ItemTemplate>
          <AlternatingItemTemplate>
              <div class="NewContentList" style="float: right; margin-left: 4px;">
                  <h1>
                      <a href="<%# Eval("Link") %>">
                          <%# Eval("ClassName")%></a></h1>
                  <div class="ContentBox">
                      <ul>
                          <TW:DataBox DataSource=<%# Bll.Latests(9,(int)Eval("ID")) %> runat="server">
                          <FirstItemTemplate>
                          <li class="FirstItem"><div class="left"><img src="<%# Eval("PicUrl") %>" width="120" height="90" title="<%# Eval("ContentTitle") %>" alt=""  /></div><div class="right"><h3><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>"><%# Eval("ContentTitle") %></a></h3><p><%# Eval("Brief")%></p></div></li>
                          
                          </FirstItemTemplate>
                              <ItemTemplate>
                                  <li><a href="<%# Eval("Link") %>" title="<%# Eval("ContentTitle") %>">
                                      <%# Eval("ContentTitle") %></a></li></ItemTemplate>
                          </TW:DataBox>
                      </ul>
                  </div>
              </div>
          </AlternatingItemTemplate>
      </TW:DataBox>
      
  </div>
</div>
<div style="height:4px">&nbsp;</div>
<!--#include file="../Footer.aspx"-->
    </form>
</body>
</html>